#ifndef Logging_h__
#define Logging_h__

#include <cstdarg>
#include <cstdio>

void LeOutputDebugString(const char* message, ...);

// TODO macro
#define MacroStr(x)   #x
#define MacroStr2(x)  MacroStr(x)
#ifdef _WIN32
#define TODO(desc)															\
__pragma (message("======  TODO  ======"))\
__pragma (message(__FILE__ "(" MacroStr2(__LINE__) ") :" #desc))\
__pragma (message("===================="))
#else
#ifdef __GNUC__
#define DO_PRAGMA(x) _Pragma (#x)
#define TODO(desc) \
	DO_PRAGMA(message ("======  TODO  ======"))													\
	DO_PRAGMA(message(__FILE__"(" MacroStr2(__LINE__) ") :" #desc));		\
	DO_PRAGMA(message ("===================="))
#else
#error "Unsupported compiler."
#endif
#endif


// Actual logging

namespace le
{
	enum ELog
	{
		eLog_Info,
		eLog_Warning,
		eLog_Error,
	};
}

#define LOG(channel, message, ...)\
	LeOutputDebugString(message, ##__VA_ARGS__)

#include "Logging.inl"

#endif // Logging_h__
